import request from '@/utils/requst';
const courses = {
  //获取
  get(params) {
    return request({
      url: "/courses/getCoursesBySubjectsId",
      method: "GET",
      params: params, //只有在请求数据的时候才用params，前面params是固定的，后面的params是形参
    });
  },
  //增加
  add(data) {
    return request({
      url: "/courses/addCourses",
      method: "POST",
      data: data, //前面data是固定的，后面的data是形参
    });
  },

  //删除一个老师数据
  delete(data) {
    return request({
      url: "/courses/deleteCourses",
      method: "DELETE",
      data: data,
    });
  },

  
  
};
export default courses;
